{extend name="index/layout" /}
{block name="app"}
{:getHtmlCode(config('web_index_head'))}
<div class="row">
    <div class="col-xl-12">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="/">首页</a></li>
            <li class="breadcrumb-item active">{{nav_title}}</li>
        </ol>
    </div>
</div>
<div class="row">
    <div class="col-xl-12">
        <ul class="nav nav-tabs">
            <li class="nav-item w-50" v-on:click="navSwitch">
                <a class="nav-link active" href="#login" data-toggle="tab">用户登录</a>
            </li>
            <li class="nav-item w-50" v-on:click="navSwitch">
                <a class="nav-link" href="#reg" data-toggle="tab">账号注册</a>
            </li>
        </ul>
    </div>
</div>
<div class="row">
    <div class="col-xl-12">
        <div class="tab-content">
            <div class="tab-pane in active" id="login">
                <div class="bg-faded p-3 border-top-0">
                    <form action="{:url('ajax/login')}" method="post" id="loginForm">
                        <div class="form-group">
                            <input type="text" name="user" placeholder="输入用户名/邮箱" class="form-control" datatype="*"
                                   required>
                        </div>
                        <div class="form-group">
                            <input type="password" name="pwd" placeholder="输入密码" class="form-control" datatype="s5-15"
                                   required>
                        </div>
                        <div class="form-group">
                            <button type="submit" class="btn btn-primary form-control">登录</button>
                        </div>
                        <div class="form-group text-center">
                            忘记密码？<a href="{:url('password')}">点击找回密码</a>
                        </div>
                    </form>
                </div>
            </div>
            <div class="tab-pane fade" id="reg">
                <div class="bg-faded p-3 border-top-0">
                    <form action="{:url('ajax/reg')}" method="post" class="ajaxForm">
                        <div class="form-group">
                            <input type="text" name="user" placeholder="输入用户名" class="form-control" datatype="s5-15"
                                   required>
                        </div>
                        <div class="form-group">
                            <input type="password" name="pwd" placeholder="设置密码" class="form-control" datatype="*5-15"
                                   id="reg_pwd"
                                   required>
                        </div>
                        <div class="form-group">
                            <input type="password" name="repwd" recheck="pwd" placeholder="再输入一次密码" datatype="s5-15"
                                   class="form-control" required>
                        </div>
                        <div class="form-group">
                            <input type="text" name="email" placeholder="邮箱账号，找回密码使用" datatype="e"
                                   class="form-control" required>
                        </div>
                        <div class="form-group">
                            <input type="text" minlength="5" maxlength="5" name="code" placeholder="输入验证码"
                                   datatype="s5-5" class="form-control" required>
                        </div>
                        <div class="form-group text-center">
                            <img src="/other/code.php" onclick="this.src='/other/code.php?'+Math.random();"
                                 title="点击更换验证码">
                        </div>
                        <div class="form-group">
                            <button type="submit" class="btn btn-primary form-control">注册</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
